<script>
    let p1 = new Promise((resolve, reject) => {
        // resolve({a:1}) // [初始]pending ---> [成功]fulfilled ( resolved )
        reject(100) // [初始]pending ---> [失败]rejected
    })

    p1.then(res => {
        console.log(res)
    }).catch(err =>{
        console.log(err)
    })

    console.log(p1)
</script>